﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YJKArchMethodLibrary.ColumnProfileAnalyze;

namespace ModelChecking.PerformanceAnalysis.ShapeCoeffiecientOfBuilding
{
	[Transaction(TransactionMode.Manual)]
	internal class UnitTesting : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			ColumnProfileAnalyzer columnProfileAnalyzer = new ColumnProfileAnalyzer(commandData);
			DocumentResultPacker documentResultPacker = new DocumentResultPacker(commandData.Application.ActiveUIDocument.Document, columnProfileAnalyzer);
			documentResultPacker.Init();
			StandardSegmentMaker standardSegmentMaker = new StandardSegmentMaker(documentResultPacker);
			standardSegmentMaker.StandardSegmentInit();
			ShapeCoefficientOfBuildingCal shapeCoefficientOfBuildingCal = new ShapeCoefficientOfBuildingCal(standardSegmentMaker);
			shapeCoefficientOfBuildingCal.CalShapeCoefficientOfBuilding();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
